Skip to content

test: make testLoadFeatureFlagsWrongKey deterministic#127

Merged
marandaneto merged 1 commit intomainfrom
fix/flaky-load-feature-flags-wrong-key-test
Apr 20, 2026
Merged

test: make testLoadFeatureFlagsWrongKey deterministic#127
marandaneto merged 1 commit intomainfrom
fix/flaky-load-feature-flags-wrong-key-test

Conversation

@marandaneto
Copy link
Copy Markdown
Member

Previously relied on a live HTTPS request with a fake personal API key and expected the real server to return a response that triggered an exception. That is flaky: network reachability and server behavior vary across CI runs. Mock the local_evaluation endpoint to return a payload with a "detail" key so loadFlags() always throws.

💡 Motivation and Context

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

If releasing new changes

  • Added the release label to the PR
  • Added exactly one version bump label: bump-patch, bump-minor, or bump-major

Previously relied on a live HTTPS request with a fake personal API key
and expected the real server to return a response that triggered an
exception. That is flaky: network reachability and server behavior vary
across CI runs. Mock the local_evaluation endpoint to return a payload
with a "detail" key so loadFlags() always throws.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@marandaneto marandaneto requested a review from a team as a code owner April 20, 2026 15:44
@marandaneto
Copy link
Copy Markdown
Member Author

marandaneto commented Apr 20, 2026

this is blocking #126 - CI flakiness

@marandaneto marandaneto enabled auto-merge (squash) April 20, 2026 15:48
@marandaneto marandaneto merged commit b8e1680 into main Apr 20, 2026
16 of 17 checks passed
@marandaneto marandaneto deleted the fix/flaky-load-feature-flags-wrong-key-test branch April 20, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants